﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Model;
using Automobile.service.DAL;
using System.Data;

namespace Automobile.service.BLL
{
    public class StockBLL
    {
        StockDAL dal = new StockDAL();

        /// <summary>
        /// 库存的分页显示
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public List<Stock> ShowStock(int PageIndex, int PageSize)
        {
            return dal.ShowStock(PageIndex, PageSize);
        }
        public int Count()
        {
            return dal.Count();
        }
        /// <summary>
        /// 获取单行数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable GetStockById(int id)
        {
            return dal.GetStockById(id);
        }
        public List<Blitem_Type> GetPandianType()
        {
            return dal.GetPandianType();
        }
        public int AddPandian(Blitem b)
        {
            return dal.AddPandian(b);
        }
           //<summary>
         //根据商品名或仓库名查询库存信息
         //</summary>
         //<param name="PageIndex"></param>
         //<param name="PageSize"></param>
         //<returns></returns>
        public List<Stock> ShowStock_kucun(int PageIndex, int PageSize,string Product_Name)
        {
           return dal.ShowStock_kucun(PageIndex,PageSize,Product_Name);
        }
    }
    }

